<span class="back pull-right">
  <i class="icon icon-chevron-left"></i> <%= link_to 'Regresar', clientes_path %>
</span>

<%= form_for(@cliente, :html=> {:class => "form-horizontal"}) do |f| %>
  <% if @cliente.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@cliente.errors.count, "error") %> prohibited this cliente from being saved:</h2>

      <ul>
        <% @cliente.errors.full_messages.each do |msg| %>
            <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

<div class="widget-caja">
  <div class="widget-titulo">
    <h5>Datos Generales del Cliente</h5>
  </div>

  <div class="widget-contenido">
    <div class="control-group catalogos">
      <label class="control-label titulos">Abreviación</label>
      <div class="controls">
        <%= f.text_field :Abreviacion, :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Nombre</label>
      <div class="controls">
        <%= f.text_field :NombreORazon , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Dirección</label>
      <div class="controls">
        <%= f.text_field :Direccion, :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Ciudad</label>
      <div class="controls">
        <%= f.text_field :Ciudad , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Estado</label>
      <div class="controls">
        <%= f.text_field :Estado , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Codigo Postal</label>
      <div class="controls">
        <%= f.text_field :CodigoPostal , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">R.F.C</label>
      <div class="controls">
        <%= f.text_field :Rfc , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Teléfono</label>
      <div class="controls">
        <%= f.text_field :Telefono , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Fax</label>
      <div class="controls">
        <%= f.text_field :Fax , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Emails</label>
      <div class="controls">
        <%= f.text_area :Emails , :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Contacto</label>
      <div class="controls">
        <%= f.text_field :Contacto, :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Contacto Alterno</label>
      <div class="controls">
        <%= f.text_field :ContactoAlterno , :class => "input-xlarge"%>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Responsable de Compras</label>
      <div class="controls">
        <%= f.text_field :ResponsableCompras, :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Responsable de Pagos</label>
      <div class="controls">
        <%= f.text_field :ResponsablePagos, :class => "input-xlarge" %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Dia de Facturación</label>
      <div class="controls">
        <%= f.select :DiaFacturacion, (1..31) %>
        Periodo <%= f.select :PeriodoFacturacion, options_for_select([["Semanal", "S"], ["Quincenal", "Q"], ["Mensual", "M"]], @cliente.PeriodoFacturacion) %>
      </div>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Dia de Pago</label>
      <div class="controls">
        <%= f.select :DiaPago, (1..31)%>
        Periodo <%= f.select :PeriodoPago, options_for_select([["Semanal", "S"], ["Quincenal", "Q"], ["Mensual", "M"]], @cliente.PeriodoPago) %>
      </div>
    </div>
    
    <div class="control-group catalogos">
      <label class="control-label titulos">DATOS DE GIRO DE LA EMPRESA</label>
    </div>

    <div class="control-group catalogos">
      <label class="control-label titulos">Industria</label>
      <div class="controls">
        <%= f.text_field :Industria, :class => "input-xlarge" %>
      </div>
    </div>
    
    <div class="control-group catalogos">
      <label class="control-label titulos">Sector</label>
      <div class="controls">
        <%= f.text_field :Sector, :class => "input-xlarge" %>
      </div>
    </div>
    
    <div class="control-group catalogos">
      <label class="control-label titulos">Productos</label>
      <div class="controls">
        <%= f.text_field :Productos, :class => "input-xlarge" %>
      </div>
    </div>
  </div>

  <div class="widget-footer">
    <%= f.submit "Guardar", :class => "btn btn-primary" %>
    <%= link_to "Cancelar", clientes_path, :class => "btn" %>
  </div>
</div>

<% end %>
